num=int(input())

num1=num
sum=0
for i in range(0,3):
    sum=sum+(num%10)**3
    num=num/10
if sum==num1:
    print("%d是水仙花数"%num1)
else:
    print("%d不是水仙花数"%num1)